In recent years, a layered semiconductor memory with memory function (BiCS: Bit Cost Scalable Flash Memory) has been developed. BiCS can embody large-capacity semiconductor memories at low cost. However, BiCS relies on voltage shifting in a manner that is affected by thermal conditions and increased circuit size is required to moderate or compensate for the thermal effects.